package com.ushine.design.design.a_creative_mode.d_builder.b_example;

public abstract class ActorBuilder {
    protected Actor actor = new Actor();

    public abstract void buildType();

    public abstract void buildSex();

    public abstract void buildface();

    public abstract void buildConstume();

    public abstract void buildHairstyle();

    //工厂方法，返回一个完整的游戏角色对象
    public Actor createActor() {
        return actor;
    }

    /**
     * 钩子方法：确定是否需要头发部件
     *
     * @return
     */
    public boolean isBareheaded() {
        return false;
    }
}
